<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
import {mapActions} from 'vuex'

export default {
  name: 'App',
  mounted () {
    this.init((type, message) => {
      if (type === 'error') {
        this.$Notice.error({
          title: message
        })
      } else {
        this.$Notice.info({
          title: message
        })
      }
    })
  },
  methods: {
    ...mapActions(['init'])
  }
}
</script>

<style lang="less">
.size{
  width: 100%;
  height: 100%;
}
html,body{
  .size;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
#app {
  .size;
}
</style>
